package com.own.business.system.parameter.base.frame.entity.map;

import com.own.business.system.parameter.base.frame.entity.po.SystemParameter;
import com.own.component.common.base.entity.BaseMap;
import com.own.constant.ConstantBeanSuffix;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.AllArgsConstructor;
import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.NonNull;
import lombok.Setter;
import lombok.ToString;
import lombok.experimental.Accessors;

import java.io.Serializable;

/**
 * SystemParameterMapVo
 *
 * @author chenxueli
 * @date 2023-06-29 09:42:59
 */
@Schema(title = "系统参数" + ConstantBeanSuffix.MAP_VO)
@Getter
@Setter
@ToString
@Accessors(chain = true)
@AllArgsConstructor
@NoArgsConstructor
public class SystemParameterMapVo extends BaseMap<SystemParameter> implements Serializable {

    @Schema(title = "系统参数组")
    private String parameterGroup;

    @Schema(title = "系统参数名称")
    private String parameterName;

    @Schema(title = "系统参数唯一编号")
    private String parameterCode;

    @Schema(title = "参数值")
    private String parameterValue;

    @Schema(title = "生效的环境")
    private String effectiveEnvironment;

    /**
     * 构造方法
     *
     * @param entity 原对象
     */
    public SystemParameterMapVo(@NonNull SystemParameter entity) {
        super(entity);
        this.parameterGroup = entity.getParameterGroup();
        this.parameterName = entity.getParameterName();
        this.parameterCode = entity.getParameterCode();
        this.parameterValue = entity.getParameterValue();
        this.effectiveEnvironment = entity.getEffectiveEnvironment();
    }

}
